package com.wl4837;

public class App
{
    public static void main( String[] args )
    {
        Light light = new Light();
        Command lightOn = new LightOnCommand(light);
        RemoteControl remote = new RemoteControl();
        remote.setCommand(lightOn);
        remote.pressButton();  // 输出：The light is ON
        remote.pressUndo();    // 输出：The light is OFF
    }
}
